//统一管理咱们项目用户相关的接口
import request from '@/utils/request'
import type { loginFormData, loginResponseData } from './type'
//项目用户相关的请求地址
enum API {
  NOTE_ADD = '/note/add',
  NOTE_DELETE = '/note/delete',
  NOTE_EDIT = '/note/edit',
  NOTE_LIST = '/note/list',
  NOTE_DETAIL = '/note/detail',
}

// 新增笔记
export const reqNoteAdd = (data) =>
  request.post<any, loginResponseData>(API.NOTE_ADD, data)

// 删除笔记
export const reqNoteDelete = (data) => request.post(API.NOTE_DELETE, data)

// 修改笔记
export const reqNoteEdit = (data) =>
  request.post<any, loginResponseData>(API.NOTE_EDIT, data)

// 查询笔记
export const reqNoteList = (params) => request.get(API.NOTE_LIST, { params})

// 笔记详情
export const reqNoteDetail = (params) => request.get(API.NOTE_DETAIL, {params})
